#pragma once
#include <typescommon.h>
int cvtHex2str(char *hexptr, int hexsize, char *outstr, int outsize);
// void logHexBuf(char *hexptr, int hexsize, const char *logFile, int logLine);
// #define logHexBufDef(hexptr, hexsize) logHexBuf(hexptr, hexsize, __FILE__, __LINE__);
int cvtStr2hex(char *instr, int insize, char *hexptr, int hexsize);

typedef struct 
{
#if DEVICE_PLATFORM_CONFIGURE == DEVICE_PLATFORM_LINUX
    char str[257];
#elif DEVICE_PLATFORM_CONFIGURE == DEVICE_PLATFORM_ARM32_MCU
    char str[65];
#elif DEVICE_PLATFORM_CONFIGURE == DEVICE_PLATFORM_C51_MCU
    char str[33];
#endif
} hexStrType;
hexStrType getHexStr(char *hexptr, int hexsize);
#define getHexBufStr(hexbuf) getHexStr(hexbuf, sizeof(hexbuf))

